import { request } from '@/utils'

export default {

  // 获取管理员用户信息
  getAdmin: (admin_id) => request.get(`/admin/getAdmin/${admin_id}`),
  // 更新管理员用户信息
  updateAdmin: (data) => request.put('/admin/updateAdmin', data),

  // 获取未审核的招聘信息
  getUnauditedJobPosting: () => request.get('/admin/getUnauditedJobPosting'),
  // 获取审核已通过的招聘信息
  getAuditedJobPosting: () => request.get('/admin/getAuditedJobPosting'),
  // 通过招聘信息
  agreeJobPosting: (job_id) => request.put(`/admin/agreeJobPosting?job_id=${job_id}`),
  // 否决招聘信息
  disagreeJobPosting: (job_id) => request.put(`/admin/disagreeJobPosting?job_id=${job_id}`),
  // 撤销招聘信息
  deleteJobPosting: (job_id) => request.put(`/admin/deleteJobPosting?job_id=${job_id}`),

  // 获取未审核的企业信息
  getUnauditedCompany: () => request.get('/admin/getUnauditedCompany'),
  // 获取审核已通过的企业信息
  getAuditedCompany: () => request.get('/admin/getAuditedCompany'),
  // 通过企业信息
  agreeCompany: (company_id) => request.put(`/admin/agreeCompany?company_id=${company_id}`),
  // 否决企业信息
  disagreeCompany: (company_id) => request.put(`/admin/disagreeCompany?company_id=${company_id}`),
  // 撤销企业信息
  deleteCompany: (company_id) => request.put(`/admin/deleteCompany?company_id=${company_id}`),
}
